<%@page import="server.process.ProcessBeanLocal"%>
<%@page import="server.entity.Category"%>
<%@page import="javax.naming.Context"%>
<%@page import="javax.naming.InitialContext"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
<jsp:include page="header.jsp"></jsp:include>
            <div id="main">
                <div id="slidebar">
                    <div id="login">
                        <jsp:include page="login.jsp"></jsp:include>
                    </div>
                    <div id="search">
                        <jsp:include page="search.jsp"></jsp:include>
                    </div>
                    <div id="product">
                        <jsp:include page="categorypanel.jsp"></jsp:include>
                    </div>
                </div>
                <div id="content">
                    <a href="#">Home</a>-><a href="#">Contest list </a>
                    <br/><a href="newCollection.jsp">Add new Collection </a>
                    <table border="0">
                        <tr>
                            <%
                            Context ctx = new InitialContext();
                            ProcessBeanLocal local = (ProcessBeanLocal) ctx.lookup("ProcessLocalJNDI");
                            String username =(String) session.getAttribute("username");
                            Category[] arrCategorys = local.getListCollection(username, false);
                                        for (int i = 0; i < arrCategorys.length; i++) {

                            %>
                            <td><img alt=""  src="Images/1.jpg" height="150" width="200"/><br/>
                                <%=arrCategorys[i].getCollectionName()%>
                                <a href="">View inside</a><a href=""> Delete</a><a href="updateCollection.jsp?id=<%=arrCategorys[i].getCollectionID()%>"> Rename</a>
                            </td>
                            <%}%>
                        </tr>
                    </table>
                </div>
            </div>
            <div id="footer">

            </div>
        </div>
    </body>
</html>